#pragma once
#include "ZuiLib.h"
#include "LRefObject.h"

namespace ZuiLib {

class LVideoControl :public LRefObject<ZVideoControl>
{
public:

	int openFile(LuaFuncState& L)
	{
		pThis->OpenFile(L.arg(0).toString());
		return 0;
	}

	int start(LuaFuncState& L)
	{
		pThis->Start();
		return 0;
	}
	int stop(LuaFuncState& L)
	{
		pThis->Stop();
		return 0;
	}

	BEGIN_MAP_FUNC(LVideoControl)
		DECLARE_FUNC(openFile),
		DECLARE_FUNC(start),
		DECLARE_FUNC(stop),
	END_MAP_FUNC
};

class LNetVideoControl :public LRefObject<ZNetVideoControl>
{
public:

	int setUrl(LuaFuncState& L)
	{
		pThis->SetUrl(L.arg(0).toString());
		return 0;
	}

	BEGIN_MAP_FUNC(LNetVideoControl)
		DECLARE_FUNC(setUrl),
	END_MAP_FUNC
};


}//namespace
